package com.leoman.userapi.service;

import com.leoman.common.service.GenericManager;
import com.leoman.exception.*;
import com.leoman.user.entity.UserLogin;
import com.leoman.user.entity.vo.FansVo;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartRequest;

/**
 * Created by Administrator on 2016/6/12.
 */
public interface UserLoginServiceApi extends GenericManager<UserLogin> {

    UserLogin findByUsername(String username);

    @SuppressWarnings("unused")
    UserLogin findOneById(Long userId) throws UserNotFindException;

    void modifyUserInfo(Long userId, String nickname, Integer gender, Integer type) throws UserNotFindException, UserNicknameExistException;

    void modifyPwd(Long userId, String mobile, String oldPwd, String newPwd, String code, Integer type) throws UserNotFindException, CodeErrorException, OldPasswordErrorException, OldNewPasswordException;

    void modifyHead(Long userId, MultipartRequest multipartRequest) throws UserNotFindException, ParamsErrorException;

    void modifyHeadPlus(Long creatorId, MultipartRequest multipartRequest, Integer stillCount, Integer lifeCount) throws ParamsErrorException, CreatorNotFindException;

    Page<FansVo> attentionPage(Long userId, Integer pageNum, Integer pageSize);

    Page<FansVo> fans(Long userId, Integer pageNum, Integer pageSize);

    void deleteImage(Long createImageId, Integer type) throws ParamsErrorException;

    void insertDynamic(Long creatorId, Long time, String status) throws ParamsErrorException, CreatorNotFindException;

    void deleteDynamic(Long id) throws ParamsErrorException;
}
